cmake_minimum_required(VERSION 3.24)
project(vision_with_mqtt)

set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED True)
set(CMAKE_CXX_EXTENSIONS False)

#set(CMAKE_PREFIX_PATH /usr/local/lib/cmake/)
find_package(PahoMqttCpp REQUIRED COMPONENTS paho-mqttpp3)

add_subdirectory(ExternLib/FineVision)

add_executable(vision_with_mqtt Src/main.cpp)
target_link_libraries(vision_with_mqtt PRIVATE PahoMqttCpp::paho-mqttpp3)
target_link_libraries(vision_with_mqtt PUBLIC lib::FineV)
target_link_libraries(vision_with_mqtt PUBLIC lib::Devices)
target_link_libraries(vision_with_mqtt PUBLIC lib::Utils)
target_include_directories(vision_with_mqtt PRIVATE ${OpenCV_INCLUDE_DIRS})
target_link_libraries(vision_with_mqtt PRIVATE ${OpenCV_LIBS})
target_link_libraries(vision_with_mqtt PRIVATE "/usr/local/lib/liblog4cplus.so")
target_link_libraries(vision_with_mqtt PRIVATE "/lib/libMVSDK.so")
target_link_libraries(vision_with_mqtt PRIVATE pthread)